package com.movie.api.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.movie.api.mapper.FilmMapper;
import com.movie.api.mapper.FilmMovieMapper;
import com.movie.api.model.entity.Film;
import com.movie.api.model.entity.FilmMovie;
import com.movie.api.service.FilmMovieService;
import com.movie.api.service.FilmService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class FilmMovieServiceImpl extends ServiceImpl<FilmMovieMapper, FilmMovie> implements FilmMovieService {
    @Resource
    private FilmMovieMapper filmMovieMapper;
    @Override
    public FilmMovie selectId(Integer id) {
        QueryWrapper<FilmMovie> filmMovieQueryWrapper = new QueryWrapper<FilmMovie>();
        filmMovieQueryWrapper.eq("film_id",id);
        return filmMovieMapper.selectOne(filmMovieQueryWrapper);
    }
}
